<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    // 定义一个类、必须有可控的属性，私有成员和静态属性
    class Prson{
        static num = 10;
        constructor(myname,age){
            this.myname = myname;
            this.age = age;
        }
        #fn(){
            console.log("这是一个私有类");
        }
        get myage(){
            return this.age;
        }
        set myage(newvalue){
            this.age = newvalue;
        }
    }
</script>